package com.authorization.apps.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Spring Authorization Server
 * <p> Package: com.auth.apps.controller </p>
 * <p> File: AuthorizationTestController.java </p>
 * <p> Description:  (认证测试接口)</p>
 * <p> Date: 2024/6/13 15:11</p>
 *
 * @author LiKai
 * @version 1.0 （代码版本）
 * @email <a href="mailto:Likai55634@aliyun.com">LiKai</a>（邮箱）
 * @date 2024/6/13 15:11
 * @since jdk17（jdk版本）
 */
@RestController
@RequestMapping("/test")
public class AuthorizationTestController {

    @PreAuthorize("hasAuthority('app')")
    @GetMapping("/helloWord")
    public String helloWord() {
        return "helloWord";
    }
}
